package com.eeepay.eeepay_v2.view;

import android.content.Context;
import android.media.Image;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.eeepay.eeepay_v2.R;
import com.eeepay.v2_library.log.LogUtils;
import com.eeepay.v2_library.view.RoundAngleImageView;

/**
 * Created by zw on 2016/3/16 0016.
 * 饼状图说明文字
 */
public class LegendView extends LinearLayout{

    private View view;
    private RoundAngleImageView imageView;
    private TextView tv_name, tv_count;

    public LegendView(Context context) {
        super(context);
        view = inflate(context, R.layout.legent_view, this);
        imageView = (RoundAngleImageView) view.findViewById(R.id.iv_left);
        tv_name = (TextView) view.findViewById(R.id.tv_name);
        tv_count = (TextView) view.findViewById(R.id.tv_count);
    }

    public LegendView setImageColor(int color){
        LogUtils.d("----------Legend View setImageColor-------------------");
        imageView.setBackgroundColor(color);
        return this;
    }

    public LegendView setName(CharSequence text){
        tv_name.setText(text);
        return this;
    }

    public LegendView setCount(CharSequence text){
        tv_count.setText(text);
        return  this;
    }


}
